
const path = require("path");
const HtmlWebpackPlugin=require("html-webpack-plugin");
module.exports = {
  entry: {
    mode:"none",
   resolve:{
    "@":path.resolve(__dirname,src)
   },
   unsafeCache:true
  },
  entry:{
    index:"./src/js/index.js",
    index1:"./src/js/index1.js",
    index2:"./src/js/index2.js",
  },
  output: {
    path: path.resolve(__dirname, "dist"),
    filename:"js/[chunkhash].js",
    clean: true,
  },
  module:{
    rules:[
      {
        test:/\.(c|sc|sa)ss$/,
        use:["style-loader","css-loder"]
      },
      {
        test:/\.(png|joeg|gif)$/,
        type:"asset",
        generator:{
          filename:"images/[contenthash][ext]"
        }
      },
      {
        test:/\.html$/,
        loader:"html-loader",
      }
    ]
  },
  Plugins:[
    new HtmlWebpackPlugin({
      filename:"index.html",
      template:"./src/index.html",
      chunks:["index"]
    }),
    new HtmlWebpackPlugin({
      filename:"pages/index1.html",
      template:"./src/pages/index1.html",
      chunks:["index1"]
      
    }),
    new HtmlWebpackPlugin({
      filename:"pages/index2.html",
      template:"./src/pages/index2.html",
      chunks:["index2"]
      
    }),
    new HtmlWebpackPlugin({
      filename:"pages/index3.html",
      template:"./src/pages/index3.html",
      chunks:["index3"]
      
    }),
    new HtmlWebpackPlugin({
      filename:"pages/index4.html",
      template:"./src/pages/index4.html",
      chunks:["index4"]
      
    }),
    new HtmlWebpackPlugin({
      filename:"pages/index5.html",
      template:"./src/pages/index5.html",
      chunks:["index5"]
      
    }),
    new HtmlWebpackPlugin({
      filename:"pages/index6.html",
      template:"./src/pages/index6.html",
      chunks:["index6"]
      
    }),
    new HtmlWebpackPlugin({
      filename:"pages/index7.html",
      template:"./src/pages/index7.html",
      chunks:["index7"]
      
    }),
  ]
 
};
